package com.probox.common.core.enums;
/**
 * 商品类别的等级
 *
 *
 * @date 2021-05-26
 */
public enum CategoryDepth {
    one(0,"一级"),
    two(1,"二级"),
    three(2,"三级");

    private CategoryDepth(Integer k, String v) {
        this.setKey(k);
        this.setValue(v);
    }

    public static String getNameByKey(Integer key) {
        String rst = null;
        for(CategoryDepth oe: CategoryDepth.values()) {
            if (oe.getKey() == key) {
                rst = oe.getValue();
            }
        }
        return rst;
    }

    private Integer key;
    private String value;

    public Integer getKey() {
        return key;
    }
    public void setKey(Integer key) {
        this.key = key;
    }
    public String getValue() {
        return value;
    }
    public void setValue(String value) {
        this.value = value;
    }
}
